package com.kaifamiao.io.d0923;

import java.lang.reflect.Modifier;

public final class ReflectDemo2 {

    public static void main(String[] args) {

        // 获取 Class 对象
//        Class cla =  obj.getClass();
//        Class cla1 = Cloneable.class;
        try {
            Class cla = Class.forName("com.kaifamiao.io.d0923.ReflectDemo2");


//            Class superclass = cla.getSuperclass();
//            System.out.println(superclass);

//            System.out.println(cla.getPackageName());
//            Package aPackage = cla.getPackage();
//            System.out.println(aPackage);

            int modifiers = cla.getModifiers();

            System.out.println(modifiers);
            System.out.println(Modifier.toString(modifiers));

        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}


